<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let q = "卖子弹了,卖枪,新用户免费注册,子弹和枪支先到先得"
        let w = q.replace("子弹", "***")
        // console.log(w);
        let e = w.replace("子弹", "***")
        // console.log(e);
        let r = e.replace("枪", "***")
        // console.log(r);
        let t = r.replace("枪", "***")
        console.log(t);
        console.log(q);
    </script>
</body>

</html>